<?php
/**
 * Permission
 *
 * @author fusq
 */
class LogConstant {
    
    public static function getActionList(){
        $translate = Zend_Registry::get('Zend_Translate');
        $action = array(
                    'ADDAG' => $translate->_('actionAddAgent'),
                    'EDITAG' => $translate->_('actionEditAgent'),
                    'DELAG' => $translate->_('actionDeleteAgent'),
                    'DELADMIN' => $translate->_('actionDeleteAdmin'),
                    'ADDADMIN' => $translate->_('actionAddAdmin'),
                    'EDITADMIN' => $translate->_('actionEditAdmin'),
                    'LOGOUTER' => $translate->_('actionLogoutCertificate'),
                    'DELRECER' => $translate->_('actionDeleteReCertificate'),
                    'RECERT' => $translate->_('actionReCertificate'),
                    'APPLYCERT' => $translate->_('certificateApply'),
                    'OLWDS' => $translate->_('onLineWithDrawSure'),
                    'OLWDD' => $translate->_('onLineWithDrawDelete'),
                    'OLWDP' => $translate->_('onLineWithDrawPass'),
                    'OLWDAD' => $translate->_('onLineWithDrawApplyDelete'),
                    'OLWDR' => $translate->_('onLineWithDrawReject'),
                    'OFWDS' => $translate->_('offLineWithDrawSure'),
                    'OFWDD' => $translate->_('offLineWithDrawDelete'),
                    'OFWDP' => $translate->_('offLineWithDrawPass'),
                    'OFWDR' => $translate->_('offLineWithDrawReject'),
                    'OFWDAD' => $translate->_('offLineWithDrawApplyDelete'),
                    'AOFA' => $translate->_('addOffLineApplication'),
                    'OLWD' => $translate->_('onLineWithDraw'),
                    'OS' => $translate->_('onLineSupplement'),
                    'OFS' => $translate->_('offLineSupplement'),
                    'OLSD' => $translate->_('onlineSupplementDelete'),
                    'OFSD' => $translate->_('offineSupplementDelete'),
                    'OFSAD' => $translate->_('offineSupplementApplyDelete'),
                    'OFSS' => $translate->_('offineSupplementSure'),
                    'OFSR' => $translate->_('offineSupplementReject'),
                    'ADT' => $translate->_('addTrade'),
                    'ADRF' => $translate->_('addRefundment'),
                    'ADP' => $translate->_('addProfit'),
                    'RTP' => $translate->_('returnProfit'),
                    'ADDAF' => $translate->_('addAgentFreezed'),
                    'ADDACM' => $translate->_('addAgentCutMoney'),
                    'ADDACM' => $translate->_('addAgentCutMoney'),
                    'ADDARM' => $translate->_('addAgentRefundMoney'),
                    'ADDARF' => $translate->_('addAgentRefundFreezed'),
                    'ADDAP' => $translate->_('addAgentProfit'),
                    'RTNAP' => $translate->_('returnAgentProfit'),
                    'ADDCG' => $translate->_('addCategory'),
                    'EDITCG' => $translate->_('editCategory'),
                    'DELCG' => $translate->_('delCategory'),
                    'ADDPRO' => $translate->_('addProduct'),
                    'EDITPRO' => $translate->_('editProduct'),
                    'DELPRO' => $translate->_('delProduct'),
                    'ADDUSER' => $translate->_('addUser'),
                    'EDITUSER' => $translate->_('editUser'),
                    'DELUSER' => $translate->_('delUser'),
                    'ADDSET' => $translate->_('addSet'),
                    'EDITSET' => $translate->_('editSet'),
                    'DELSET' => $translate->_('delSet'),
                    'ADDSGROUP' => $translate->_('addSetGroup'),  
                    'EDITSGROUP' => $translate->_('editSetGroup'),  
                    'DELSGROUP' => $translate->_('delSetGroup'),
                    'ADDMETA' => $translate->_('addMetadata'), 
                    'EDITMETA' => $translate->_('editMetadata'),
                    'DELMETA' => $translate->_('delMetadata')  
                 );
        return $action;
    }

    public static function getAction($key){
        $action = LogConstant::getActionList();
        return $action[$key];
    }

    public static function getTypeList(){
        $translate = Zend_Registry::get('Zend_Translate');
        $type = array(
                    1 => $translate->_('frontType'),
                    2 => $translate->_('backendType'),
                    3 => $translate->_('interfaceType')
                 );
        return $type;
    }

    public static function getType($key){
        $type = LogConstant::getTypeList();
        return $type[$key];
    }
    
    public static function getEmailTypeList(){
    	$translate = Zend_Registry::get('Zend_Translate');
    	$emailType = array(
    	           1 => $translate->_('orderSubmitInformEmail'),
    	           2 => $translate->_('orderConfirmInformEmail'),
    	           3 => $translate->_('shippedInformEmail'),
    	           4 => $translate->_('receiptInformEmail'),
    	           5 => $translate->_('orderSuccessInformEmail'),
    	           6 => $translate->_('registerInformEmail'),
    	           7 => $translate->_('findPasswordInformEmail'),
    	           8 => $translate->_('backendManagementEmail')
    	        );
    	return $emailType;
    }
    
    public static function getEmailType($key){
    	$emailType = self::getEmailTypeList();
    	return $emailType[$key];
    }
}